/*
 * sms_appender.h
 *
 *  Created on: 2008-12-2
 *      Author: fanliangliang
 */

#ifndef SMS_APPENDER_H_
#define SMS_APPENDER_H_

#include "toxic.h"
#include "short_message.h"
#include "message_service.h"
#include <string>
#include <vector>

using toxic::Appender;
using toxic::Log;
using std::string;
using std::vector;

class SmsAppender : public Appender {
public:
	SmsAppender();
	virtual ~SmsAppender();
	virtual void doAppend(const Log::Event& e);

	void setWarnLevel(Log::Level level);
	void setMessageService(const MessageService& service);
	void addPhoneNumber(const string& phoneNumber);
	void addPhoneNumber(const vector<string>& phoneNumbers);

private:
	Log::Level _level;
	MessageService _service;
	ShortMessage _message;
};

#endif /* SMSAPPENDER_H_ */
